home *** CD-ROM | disk | FTP | other *** search
-
-
-
- AAAARRRR((((1111)))) AAAARRRR((((1111))))
-
-
-
- NNNNAAAAMMMMEEEE
- ar - archive and library maintainer
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ar -d [-lv] archive file ...
- ar -m [-lv] [-abi] [posname] archive file ...
- ar -p [-ls] archive [file ...]
- ar -q [-clzf] archive file ...
- ar -r [-cuvsfl] [-abi] [posname] archive file ...
- ar -t [-vs] archive [file ...]
- ar -x [-vosCT] archive [file ...]
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The archiver (aaaarrrr) maintains groups of files as a single archive file.
- Generally, you use this utility to create and update library files that
- the link editor uses; however, you can use the archiver for any similar
- purpose.
-
- This version of aaaarrrr produces both 32-bit and 64-bit archives. The 32-bit
- archive format is defined in the System V Release 4 ABI. The 64-bit
- archive format is defined in the 64-bit ELF OBJECT File Specification.
- 32-bit objects and 64-bit objects cannot be mixed in an archive. The
- first object determines whether the archive will be 32-bit or 64-bit, if
- the archive does not exist to begin with. In compilers of version 7.x
- and higher, the archiver also archives WHIRL objects. Mixing is allowed
- between 32-bit relocatable ELF objects and 32-bit WHIRL objects, and
- between 64-bit relocatable ELF objects and 64-bit WHIRL objects.
- Different versions of WHIRL objects are NOT mixable.
-
- If the environment variable _XPG is defined, _a_r operates in conformance
- with the X/Open XPG4 specifications. The format of the output may differ
- in accordance to the XPG4 standards. Changes are either in the exit
- status or the format of the output.
-
- Any option that changes an object library causes the archive-symbol-table
- to be updated. This makes adding one file at a time to a library very
- slow.
-
- Useless options (such as using option ----uuuu with option ----tttt) are not
- diagnosed. NNNNOOOOTTTTEEEE:::: aaaarrrr uses a portable ASCII-format archive that you can
- use on various machines that run UNIX.
-
- Options are documented here with a leading hyphen(-) form. An older form
- with all option letters together and no leading hyphen is still
- supported. The first example below shows the old form.
-
- Examples:
- ar cr lib.a a.o b.o
- ar -c -r lib.a a.o b.o
- ar -cr lib.a a.o b.o
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- AAAARRRR((((1111)))) AAAARRRR((((1111))))
-
-
-
- Options are:
-
- ----aaaa Position new files in the archive after the file named by the
- _p_o_s_n_a_m_e operand. Use this suboption with the mmmm or rrrr options.
-
- ----bbbb Position new files in the archive before the file named by the
- _p_o_s_n_a_m_e operand. Use this suboption with the mmmm or rrrr options.
-
- ----cccc Suppress the normal message that the archiver prints when it creates
- the archive file _a_r_c_h_i_v_e. Normally, the archiver creates the
- specified archiver file when it needs to.
-
- ----CCCC Prevent extracted files from replacing like-named files in the file
- system. This option is useful when ----TTTT is also used, to prevent
- truncated names from replacing files with the same prefix.
-
- ----dddd Delete the specified _f_i_l_es from _a_r_c_h_i_v_e.
-
- ----iiii Position new files in the archive before the file named by the
- _p_o_s_n_a_m_e operand (equivalent to ----bbbb). Use this suboption with the ----mmmm
- or ----rrrr options.
-
- ----ffff Adds padding to the end of each object file archived, using the
- character '\0'. This enables the loader (lllldddd) to have faster access
- to members in the archive while performing static linking. _W_a_r_n_i_n_g:
- this option results in the change in size of files permanently,
- normally increased by 1 to 15 bytes. In compiler releases 7.1 and
- higher, this option is the default.
-
- ----llll Puts temporary files in the local directory. If option ----llll is not
- supplied and the environment variable TTTTMMMMPPPPDDDDIIIIRRRR is defined then
- TTTTMMMMPPPPDDDDIIIIRRRR's value is used as the name of the directory for temporary
- files. If neither option ----llll nor TTTTMMMMPPPPDDDDIIIIRRRR is supplied, the archiver
- puts its temporary files in the directory /_t_m_p.
-
- ----mmmm Moves the specified files to the end of the archive. If you specify
- a positioning character, you must also specify the _p_o_s_n_a_m_e (as in
- option ----rrrr)))) to tell the archiver where to move the files.
-
- ----oooo Force each newly created file to have the `last modified' date that
- it had before it was extracted from the archive.
-
- ----pppp Prints the contents of the _f_i_l_es from _a_r_c_h_i_v_e to the standard
- output. If no _f_i_l_e_s are specified, the contents of all files in the
- archive will be written in the order of the archive.
-
- ----qqqq Append the specified files to the end of the archive file. The
- archiver does not accept suboption positioning characters with the
- ----qqqq option. It also does not check whether the files you want to add
- already exist in the archive. This is useful to bypass the
- searching otherwise done when creating a large archive piece by
- piece. Since the archive-symbol-table of an object library is
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- AAAARRRR((((1111)))) AAAARRRR((((1111))))
-
-
-
- updated with ----qqqq it is advisable to add as many files as possible in
- one execution of _a_r. Only ----qqqqzzzz (see ----zzzz below) avoids quadratic
- behavior when creating a large object archive piece by piece.
-
- ----rrrr Replace or add _f_i_l_es to _a_r_c_h_i_v_e. If the archive named by _a_r_c_h_i_v_e
- does not exist, a new archive file will be created and a diagnostic
- message will be written to standard error (unless the ----cccc option is
- specified). If no _f_i_l_es are specified and the _a_r_c_h_i_v_e exists,
- nothing is done. Files that replace existing files will not change
- the order of the archive. If you use the suboption ----uuuu with ----rrrr,,,, the
- archiver only replaces those files that have `last-modified' dates
- later than the archive files. If you use a positioning character
- (from the set aaaabbbbiiii)))) you must specify the _p_o_s_n_a_m_e argument to tell the
- archiver to put the new files after (aaaa) or before (bbbb or iiii).
- Otherwise, the archiver puts new files at the end of the archive.
-
- ----ssss Makes an archive-symbol-table file in the archive. The ----ssss option is
- automatically added when any of the options ----dddd, ----mmmm, or ----rrrr is
- requested.
-
- If you specify ----ssss, the archiver creates the archive-symbol-table
- file as its last action before finishing execution. You must
- specify at least one other archive option (mmmm, pppp, dddd, rrrr, or tttt) when
- you use the ----ssss option.
-
- ----tttt Write a table of contents for the files in _a_r_c_h_i_v_e to the standard
- output. If you don't specify any file names, write a table of
- contents for all files in the order of the archave. If you specify
- file names, the archiver writes a table of contents only for those
- files.
-
- ----TTTT Allow filename truncation of extracted files whose archive names are
- longer than the file system can support. By default, extracting a
- file with a name that is too long is an error; a diagnostic message
- will be written and the file will not be extracted.
-
- ----uuuu Update older files. When used with the ----rrrr option, files within the
- archive will be replaced only if the corresponding _f_i_l_e is newer
- than the existing _a_r_c_h_i_v_e file. This option uses the UNIX system
- `last-modified' date for this comparison. ----uuuu gives no warning when
- replacement is refused.
-
- ----vvvv Gives a verbose file-by-file description as the archiver makes a new
- archive file from an old archive and its constituent files. When
- you use this option with ----tttt,,,, the archiver lists, on standard output,
- all information about the files in the archive. When you use this
- option with ----pppp, the archiver writes the name of the file to standard
- output before writing the file itself to standard output. If you
- add a second ----vvvv additional informational messages can appear.
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- AAAARRRR((((1111)))) AAAARRRR((((1111))))
-
-
-
- ----xxxx Extract the files named by the _f_i_l_e operands from the _a_r_c_h_i_v_e. The
- contents of the archive file will not be changed. If you don't
- specify any file names, the archiver extracts all files. Normally,
- the `last-modified' date for each extracted file shows the date when
- someone extracted it; however, when you use ----oooo,,,, the archiver resets
- the `last-modified' date to the date recorded in the archive.
-
- ----zzzz Only be useful with ----qqqq. ----qqqqzzzz supresses updating of the archive-
- symbol-table and updates the archive in-place. The resulting
- archive cannot be used with _l_d (and is not a System V Release 4 ABI
- compliant archive) until an archive-symbol-table update is done.
- _l_d(1) will fail with a message suggesting use of aaaarrrr ----ttttssss if the last
- change to the archive uses ----qqqqzzzz: Use of ----qqqqzzzz is discouraged: the
- updates are not checked for duplications and in case of a file or
- other error the archive may be destroyed. If any file name added is
- longer than 15 characters, line _q_z updates the archive-symbol-table
- even with ----qqqqzzzz. If all file names added with qqqqzzzz on a particular
- execution are 15 characters or less the archive-symbol-table update
- is suppressed (even if some file names already in the archive are
- longer than 15 characters). xxxx option.
-
- FFFFIIIILLLLEEEESSSS
- /tmp/ar.tmp.v* or TMPDIR/ar.tmp.v* temporaries
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- lorder(1), ld(1), ar(4)
-
- System V Application Binary Interface, ISBN 0-13-877598-2, Prentice Hall
-
- NNNNOOOOTTTTEEEESSSS
- There is no _r_a_n_l_i_b program in IRIX. Option ----ssss creates the archive-
- symbol-table _l_d uses.
-
- Options ----rrrr, ----dddd, ----mmmm, and ----qqqq imply option ----ssss. Since option ----ssss creates an
- archive-symbol-table, creating an object library by executing _a_r once per
- object file will be very slow. Creating an object library with a single
- execution of _a_r is much faster.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- xxxxxxxxxxxxxxxxxxxx nnnnooootttt ffffoooouuuunnnndddd
- The file xxxxxxxxxxxxxxxxxxxx was not found in the archive. It could mean a simple
- misspelling, but it could also mean that you supplied xxxxxxxxxxxxxxxxxxxx more
- than the number of times xxxxxxxxxxxxxxxxxxxx appears in the archive! Files not
- found change the exit code from _a_r but any attempted update of the
- archive (by option rrrr for example) is not suppressed.
-
- nnnnooootttt iiiinnnn aaaarrrrcccchhhhiiiivvvveeee ffffoooorrrrmmmmaaaatttt
- You probably forgot to specify the archive name in the command.
- The _a_r_c_h_i_v_e mentioned in the synopsis should be the archive name.
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- AAAARRRR((((1111)))) AAAARRRR((((1111))))
-
-
-
- The diagnostics "s - creating Symbol hash table" and "s - done" are no
- longer emitted when ----vvvv is used (to make the -v output standard-
- conforming). If you really want to see those messages, add a second v,
- as in ----vvvvvvvv.
-
- MMMMOOOORRRREEEE NNNNOOOOTTTTEEEESSSS
- The behavior documented in this section is not guaranteed to remain the
- same across releases. This section is provided as help in case _a_r does
- something surprising.
-
- If there is only one hard link (ie, at most one non-symbolic-link. see
- _l_n(2)) to an archive which is being updated then an old archive contents
- are replaced by the new contents by _r_e_n_a_m_e(2). Otherwise, when updating,
- replacement is by copying the new data onto the old file. If the archive
- is updated, the replacement archive is built in the same directory as the
- named archive (after following symbolic links to the location of the
- named archive).
-
- In case the copy operation mentioned above is interrupted in mid-copy
- (which is normally not possible) _a_r will attempt to set the archive
- length to 0 and the modification-date to January 1, 1970 as a hint that
- the archive is not usable.
-
- If the _a_r command results in an unchanged archive, the old archive will
- not be replaced. This is best achieved with, for example, _a_r _r_u _l_i_b._a
- _x._o; if the named object file is not put into the archive, the archive is
- not modified. The definition of unchanged is very conservative: _a_r _r
- _l_i_b._a _x._o, for example, always changes the archive since x.o is added or
- replaced (even though x.o itself may be unchanged).
-
- The following is a sampling of traditional _a_r behaviors that you may find
- surprising.
-
- If you specify the same file twice in an argument list, it can appear
- twice in the archive file.
-
- The oooo option does not change the `last-modified' date of a file unless
- you own the extracted file or you are the super-user.
-
- Trailing slashes are removed from file-path-names. Only the final
- component of a file-path-name is recorded in an archive. For example, in
- /a/b/c/dfile//// the file searched for is /a/b/c/dfile and the name
- recorded in the archive is dfile.
-
- If you give _a_r the same name twice in an ar x command the second instance
- of the name will provoke a ``not found'' message.
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-